# -*- coding:utf-8 -*-
# @Time : 2020/7/31 8:27
# @Author : Administrator
# @File : course.py
# @Software: PyCharm
# @Motto: good good study,day day up


from django import template

register = template.Library()


@register.filter
def model_name(obj):
    try:
        return obj._meta.model_name
    except AttributeError:
        return None
